package com.shop.entity;

import java.util.Objects;

//��Ʒ�����
public class GoodDetail {
    private int gd_id;         //��Ʒ����id
    private int gtf_id;        //��Ʒһ������id
    private int tst_id;        //��Ʒ��������id
    private int gtt_id;        //��Ʒ��������id
    private int gft_id;        //��Ʒ�ļ�����id
    private double gd_price;   //��Ʒ����
    private int gd_num;        //��Ʒ����
    private int gid;           //��Ʒid�������
    private int s_id;          //�̼�id�������
    private int gd_buyNum;     //��������

    public int getGd_id() {
        return gd_id;
    }

    public void setGd_id(int gd_id) {
        this.gd_id = gd_id;
    }

    public int getGtf_id() {
        return gtf_id;
    }

    public void setGtf_id(int gtf_id) {
        this.gtf_id = gtf_id;
    }

    public int getTst_id() {
        return tst_id;
    }

    public void setTst_id(int tst_id) {
        this.tst_id = tst_id;
    }

    public int getGtt_id() {
        return gtt_id;
    }

    public void setGtt_id(int gtt_id) {
        this.gtt_id = gtt_id;
    }

    public int getGft_id() {
        return gft_id;
    }

    public void setGft_id(int gft_id) {
        this.gft_id = gft_id;
    }

    public double getGd_price() {
        return gd_price;
    }

    public void setGd_price(double gd_price) {
        this.gd_price = gd_price;
    }

    public int getGd_num() {
        return gd_num;
    }

    public void setGd_num(int gd_num) {
        this.gd_num = gd_num;
    }

    public int getGid() {
        return gid;
    }

    public void setGid(int gid) {
        this.gid = gid;
    }

    public int getS_id() {
        return s_id;
    }

    public void setS_id(int s_id) {
        this.s_id = s_id;
    }

    public int getGd_buyNum() {
        return gd_buyNum;
    }

    public void setGd_buyNum(int gd_buyNum) {
        this.gd_buyNum = gd_buyNum;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        GoodDetail that = (GoodDetail) o;
        return gd_id == that.gd_id &&
                gtf_id == that.gtf_id &&
                tst_id == that.tst_id &&
                gtt_id == that.gtt_id &&
                gft_id == that.gft_id &&
                Double.compare(that.gd_price, gd_price) == 0 &&
                gd_num == that.gd_num &&
                gid == that.gid &&
                s_id == that.s_id &&
                gd_buyNum == that.gd_buyNum;
    }

    @Override
    public int hashCode() {
        return Objects.hash(gd_id, gtf_id, tst_id, gtt_id, gft_id, gd_price, gd_num, gid, s_id, gd_buyNum);
    }

    @Override
    public String toString() {
        return "GoodDetail{" +
                "gd_id=" + gd_id +
                ", gtf_id=" + gtf_id +
                ", tst_id=" + tst_id +
                ", gtt_id=" + gtt_id +
                ", gft_id=" + gft_id +
                ", gd_price=" + gd_price +
                ", gd_num=" + gd_num +
                ", gid=" + gid +
                ", s_id=" + s_id +
                ", gd_buyNum=" + gd_buyNum +
                '}';
    }

    public GoodDetail(int gd_id, int gtf_id, int tst_id, int gtt_id, int gft_id, double gd_price, int gd_num, int gid, int s_id, int gd_buyNum) {
        this.gd_id = gd_id;
        this.gtf_id = gtf_id;
        this.tst_id = tst_id;
        this.gtt_id = gtt_id;
        this.gft_id = gft_id;
        this.gd_price = gd_price;
        this.gd_num = gd_num;
        this.gid = gid;
        this.s_id = s_id;
        this.gd_buyNum = gd_buyNum;
    }

    public GoodDetail() {
    }


}
